<template>
  <Spin :spinning="exportLoading" tip="Loading...">
    <el-tabs v-model="activeName" type="card" @tab-click="handleClick">
      <el-tab-pane label="终端信息" name="info">
        <FormPanel ref="formPanel" :list="formList" :labelPosition="'top'" :formType="type" @formChange="changeHandle" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
        <FormPanel ref="formPanel1" :list="formList1" :labelPosition="'top'" :formType="type" @formChange="changeHandle1" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
        <FormPanel ref="formPanel2" :list="formList2" :labelPosition="'top'" :formType="type" @formChange="changeHandle2" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
        <FilterTable ref="table" :columns="columns1" :dataSource="tableList1" :isSelectColumn="false" :isPagination="false" :isColumnFilter="false" :isToperInfo="false" height="auto" :onColumnsChange="(columns) => (this.columns = columns)"></FilterTable>
        <FormPanel ref="formPanel3" :list="formList3" :labelPosition="'top'" :formType="type" @formChange="changeHandle3" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
        <FormPanel ref="formPanel4" :list="formList4" :labelPosition="'top'" :formType="type" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
      </el-tab-pane>
      <el-tab-pane label="变更明细" name="detailed">
        <FilterTables
          ref="table"
          columnsRef="salesChangeQuery"
          :height="300"
          :isSelectColumn="false"
          :columns="columns"
          :dataSource="dataSource"
          :datakey="'records'"
          :onColumnsChange="columns => (this.columns = columns)"
        >
        </FilterTables>
        <div class="detailed" v-if="ttVsSolidAuditAccessoryPOS.length > 0">
          <el-row>
            <el-col :span="12">
              <FormPanel ref="formPanel5" :list="formList5" :labelPosition="'top'" :formType="type" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="2" />
            </el-col>
            <el-col :span="12">
              <FormPanel ref="formPanel6" :list="formList6" :labelPosition="'top'" :formType="type" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="2" />
            </el-col>
          </el-row>
        </div>
      </el-tab-pane>
      <!-- <el-tab-pane label="电池租赁" name="second" v-if="isShow">
      <FormPanel ref="formList7" :list="formList7" :labelPosition="'top'" :formType="type" :isSubmitBtn="false" :collapse="false" labelWidth="110" :cols="4" />
    </el-tab-pane> -->
    </el-tabs>
    <div style="height:47px;"></div>
    <div
      :style="{
        position: 'fixed',
        left: 0,
        bottom: 0,
        right: 0,
        zIndex: 9,
        borderTop: '1px solid #e9e9e9',
        padding: '10px 20px',
        background: '#fff',
        textAlign: 'center'
      }"
    >
      <el-button @click="closeDrawer">返 回</el-button>
    </div>
  </Spin>
</template>
<script>
import { dictionary } from '@/utils/dictMixin';
import { getInfoById } from '@/api/omSaleP/ActualSales/salesChangeApproval';
import { IDNumber,zipCode } from '@/utils/validate';

export default {
  mixins: [dictionary],
  props: ['type', 'rowData'],
  name: 'SonModel',
  data() {
    this.saveData = null;
    this.saveData1 = null;
    this.saveData2 = null;
    this.saveData3 = null;
    return {
      formList: this.createdFrom(),
      formList1: this.createdFrom1(),
      formList2: this.createdFrom2(),
      formList3: this.createdFrom3(),
      formList4: this.createdFrom4(),
      formList5: this.createdFrom5(),
      formList6: this.createdFrom6(),
      formList7: this.createdFrom7(),
      columns: this.createdTable(),
      columns1: this.createdTable1(),
      tableList1: [],
      dataSource: [],
      isCan: false,
      isShow: false,
      empList: [],
      carInfo: {},
      customerInfo: {},
      exportLoading: false,
      salesReportInfo: {},
      ttVsSolidAuditAccessoryPOS: [],
      activeName: 'info'
    };
  },
  created() {
    this.formList.forEach(element => {
      element.disabled = true;
    });
    this.formList1.forEach(element => {
      element.disabled = true;
    });
    this.formList2.forEach(element => {
      element.disabled = true;
    });
    this.formList3.forEach(element => {
      element.disabled = true;
    });
  },
  mounted() {
    this.init();
     if (this.type === 'show') {
        this.formList.forEach((item) => {
          item.rules = [];
        });
        this.formList1.forEach((item) => {
          item.rules = [];
        });
        this.formList2.forEach((item) => {
          item.rules = [];
        });
        this.formList3.forEach((item) => {
          item.rules = [];
        });
      }
  },
  methods: {
    init() {
      if (this.type != 'add') {
        this.getDetail();
      }
    },
    // 详细
    async getDetail() {
      this.exportLoading = true;
      const actualSalesId = this.rowData.actualSalesId;
      const auditId = this.rowData.auditId;
      const isSignboard = 1;
      const res = await getInfoById({ actualSalesId, auditId, isSignboard });
      if (res.resultCode == 200) {
        this.tableList1 = res.data.ttSoRightsInterestsPos;
        if(res.data.isBatteryRental==10041001){
          this.isShow=true
        }
        const dataTable = [

          {
            name: 'licenseVehicleNature',
            val: '2114'
          },
          {
            name: 'customerType',
            val: '2117'
          },
          {
            name: 'sex',
            val: '1002'
          },
          {
            name: 'ageStage',
            val: '2118'
          },
          {
            name: 'idTypeCode',
            val: '2120'
          },
          {
            name: 'occupationType',
            val: '2122'
          },
          {
            name: 'educationLevel',
            val: '1035'
          },
          {
            name: 'householdType',
            val: '2121'
          },
          {
            name: 'unitNature',
            val: '2123'
          },
          {
            name: 'industryType',
            val: '2124'
          },
          {
            name: 'intentLevel',
            val: '2430'
          },
          {
            name: 'maritalStatus',
            val: '2125'
          },
          {
            name: 'annualHouseholdIncome',
            val: '2126'
          },
          {
            name: 'hobby',
            val: '2129'
          },
          {
            name: 'favoriteContactType',
            val: '2131'
          },
          {
            name: 'convenientTime',
            val: '2128'
          },
          {
            name: 'isVip',
            val: '1004'
          },
          {
            name: 'purchasePurpose',
            val: '2127'
          },
          {
            name: 'isSpecialOrder',
            val: '1004'
          },
          {
            name: 'isThreeGuarantees',
            val: '1004'
          },
          {
            name: 'isAnotherPlace',
            val: '1004'
          },
          {
            name: 'buildChargingPiles',
            val: '1004'
          },
          {
            name: 'isApplySubsidies',
            val: '1004'
          },
          {
            name: 'isRebate',
            val: '1004'
          },
          {
            name: 'isReplace',
            val: '1004'
          },
          {
            name: 'isSalesSprint',
            val: '1004'
          },
          {
            name: 'isBuyAgain',
            val: '1004'
          },
          {
            name: 'isBatteryRental',
            val: '1004'
          },
          {
            name: 'handoverCarMethod',
            val: '2155'
          },
          {
            name: 'typeOfPayment',
            val: '2156'
          },
          {
          name: 'isTestDriveCar',
          val: '1004'
          }
        ];
        this.dataSource = res.data.ttVsSolidAuditDetailPOS || [];
        this.ttVsSolidAuditAccessoryPOS = res.data.ttVsSolidAuditAccessoryPOS || [];
        const filterName = (arr, val) => {
          // console.log(arr, val);
          const filterArr = arr.filter(item => item.value == val);
          // console.log(filterArr);
          let returnName = '';
          if (filterArr.length > 0) {
            returnName = filterArr[0].text;
          } else {
            returnName = val;
          }
          console.log(returnName);
          return returnName;
        };
        const that = this;
        this.dataSource.forEach((item,index) => {
            if(item.auditAfter == 0 && !item.auditBefore ) {
              console.log("删除",index)
              this.dataSource.splice(index,1)
            }
          })
        this.dataSource.forEach(item => {
          const arr = dataTable.filter(value => value.name == item.auditCode);
          if (arr.length > 0) {
            const filterItems = that.createDictList(arr[0].val);
            console.log(filterItems, arr[0].val);
            // that.columns[2].filterItems = that.createDictList(arr[0].val);
            const value2 = filterName(filterItems, item.auditBefore);
            const value3 = filterName(filterItems, item.auditAfter);
            item.value2 = value2;
            item.value3 = value3;
          } else {
            item.value2 = item.auditBefore;
            item.value3 = item.auditAfter;
          }
        });
        console.log(this.dataSource);
        for (let i in res.data) {
          this.formList.map(x => {
            if (x.fieldName == i && res.data[i]) {
              x.initialValue = res.data[i];
              if (x.fieldName === 'powerType') {
                this.selectPowerType(res.data[i]);
              }
            }
          });
          this.formList1.map(x => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
              if (x.fieldName === 'customerType') {
                this.selectCustomer(res.data[i]);
              }
              if (x.fieldName === 'isVip') {
                this.isSelectVip(res.data[i]);
              }
            }
          });
          this.formList2.map(x => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
              if (x.fieldName === 'isRebate') {
                this.isSelectRebate(res.data[i]);
              }
              // if (x.fieldName === 'isReplace') {
              //   this.isSelectReplace(res.data[i]);
              // }
            }
          });
          this.formList3.map(x => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
            }
          });
          this.formList7.map(x => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
            }
          });
          this.formList4.map(x => {
            if (x.fieldName == i) {
              x.initialValue = res.data[i];
            }
          });
        }
      }
      this.exportLoading = false;
    },
    changeHandle(val) {
      this.saveData = val;
    },
    changeHandle1(val) {
      this.saveData1 = val;
    },
    changeHandle2(val) {
      this.saveData2 = val;
    },
    changeHandle3(val) {
      this.saveData3 = val;
    },
    closeDrawer(type) {
      this.$emit('close', false, type);
    },
    pushURL(item) {
      if (item.annexName) {
        item.data.push({
          name: item.annexName,
          uid: item.annexUid,
          url: item.annexUrl
        });
      }
    },
    handleClick() {
      console.log(this.ttVsSolidAuditAccessoryPOS);
      if (this.activeName == 'info') return;
      this.exportLoading = true;
      let beforeData = this.ttVsSolidAuditAccessoryPOS.filter(item => item.isChange === 0);
      let afterData = this.ttVsSolidAuditAccessoryPOS.filter(item => item.isChange === 1);
      console.log(beforeData, afterData);
      const repeatAfter = afterData.filter(item => {
        console.log(item.billType == 11121003, item.billType);
        return item.billType == 11121003;
      });
      let screenAfter = {};
      if (repeatAfter.length > 0) {
        screenAfter = { ...repeatAfter[0], data: [] };
        console.log(screenAfter, repeatAfter);
        repeatAfter.forEach(item => {
          if (item.annexName) {
            screenAfter.data.push({
              name: item.annexName,
              uid: item.annexUid,
              url: item.annexUrl
            });
          }
        });
      }
      const repeatBefore = beforeData.filter(item => item.billType == 11121003);
      console.log(repeatAfter, repeatBefore);
      let screenBefore = {};
      if (repeatBefore.length > 0) {
        screenBefore = { ...repeatBefore[0], data: [] };
        console.log(screenBefore, repeatBefore);
        repeatBefore.forEach(item => {
          if (item.annexName) {
            screenBefore.data.push({
              name: item.annexName,
              uid: item.annexUid,
              url: item.annexUrl
            });
          }
        });
      }
      beforeData = beforeData.filter(item => item.billType != 11121003);
      afterData = afterData.filter(item => item.billType != 11121003);
      if (screenBefore.billType) {
        beforeData.push(screenBefore);
      }
      if (screenAfter.billType) {
        afterData.push(screenAfter);
      }
      console.log(screenBefore, screenBefore);
      console.log(beforeData, afterData);
      afterData.forEach(item => {
        this.formList5.map(x => {
          if (x.billType == item.billType) {
            x.hidden = false;
          }
        });
      });
      beforeData.forEach(item => {
        if (item.billType !== 11121003) {
          // console.log(item)
          item.data = [];
          this.pushURL(item);
        }
        this.formList5.map(x => {
          if (x.billType == item.billType) {
            x.initialValue = item.data;
          }
        });
      });
      afterData.forEach(item => {
        if (item.billType !== 11121003) {
          //  console.log(item)
          item.data = [];
          this.pushURL(item);
        }
        this.formList6.map(x => {
          if (x.billType == item.billType) {
            x.hidden = false;
            x.initialValue = item.data;
          }
        });
      });
      this.exportLoading = false;
      //  const beforefilterUnique = beforeData.filter(i => beforeData.indexOf(i) !== beforeData.lastIndexOf(i))
      //  const afterfilterUnique = afterData.filter(i => afterData.indexOf(i) !== afterData.lastIndexOf(i))
      //  console.log(beforefilterUnique)
      //  console.log(afterfilterUnique)
      //  console.log(beforeData)
      //  console.log(afterData)
    },
    showItems1(type) {
      this.formList1.find(x => x.fieldName == 'customerType').initialValue = type;
      if (type == 15231003) {
        this.formList1.find(x => x.fieldName == 'companyLinkMan').hidden = false;
        this.formList1.find(x => x.fieldName == 'companyLinkPhone').hidden = false;
        this.formList1.find(x => x.fieldName == 'corpName').hidden = false;
        this.formList1.find(x => x.fieldName == 'corpMobile').hidden = false;
        this.formList1.find(x => x.fieldName == 'fax').hidden = false;
        return;
      }
      this.formList1.find(x => x.fieldName == 'companyLinkMan').hidden = true;
      this.formList1.find(x => x.fieldName == 'companyLinkPhone').hidden = true;
      this.formList1.find(x => x.fieldName == 'corpName').hidden = true;
      this.formList1.find(x => x.fieldName == 'corpMobile').hidden = true;
      this.formList1.find(x => x.fieldName == 'fax').hidden = true;
    },
    showItems2(type) {
      this.formList2.find(x => x.fieldName == 'payType').initialValue = type;
      if (type == 60151001) {
        this.formList2.find(x => x.fieldName == 'financialInstitution').hidden = false;
        this.formList2.find(x => x.fieldName == 'periodsNumber').hidden = false;
        return;
      }
      this.formList2.find(x => x.fieldName == 'financialInstitution').hidden = true;
      this.formList2.find(x => x.fieldName == 'periodsNumber').hidden = true;
    },
    // 客户类型选择
    selectCustomer(val) {
      // 公司
      console.log(val);
      if (val === 21171002) {
        this.formList1.forEach(item => {
          // item.hidden?!item.hidden:item.hidden
          if (item.hidden && item.fieldName !== 'bigCustomerFiles') {
            item.hidden = false;
          }
        });
        this.formList1.find(x => x.fieldName == 'sex').rules = [];
        this.formList1.find(x => x.fieldName == 'idTypeCode').rules = [];
        this.formList1.find(x => x.fieldName == 'idNumber').rules = [];
        this.formList1.find(x => x.fieldName == 'identityCardFront').rules = [];
        this.formList1.find(x => x.fieldName == 'identityCardReverse').rules = [];
        this.formList1.find(x => x.fieldName == 'sex').disabled = true;
        this.formList1.find(x => x.fieldName == 'idTypeCode').disabled = true;
        this.formList1.find(x => x.fieldName == 'idNumber').disabled = true;
      if (this.type !== 'show') {
        this.formList1.find(x => x.fieldName == 'soNo').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList1.find(x => x.fieldName == 'customerType').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList1.find(x => x.fieldName == 'legalIdentityCardFront').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList1.find(x => x.fieldName == 'legalIdentityCardReverse').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList1.find(x => x.fieldName == 'businessLicense').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList1.find(x => x.fieldName == 'adminAuthorizationFiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList1.find(x => x.fieldName == 'unitContactPersonCardFront').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList1.find(x => x.fieldName == 'unitContactPersonCardReverse').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'consultantName').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'orderAllAmount').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'handoverCarTime').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'proceduralContract').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'holdIdentityCard').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'isSpecialOrder').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'isThreeGuarantees').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'buildChargingPiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        // this.formList2.find(x => x.fieldName == 'commercialInsuranceFiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        // this.formList2.find(x => x.fieldName == 'trafficlInsuranceFiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
      }
        this.formList1.find(x => x.fieldName == 'isVip').rules = [];

        // this.formList1.find(x => x.fieldName == 'identityCardReverse').disabled = false;
        // 公司只能选择 统一社会信用代码和组织机构代码
        const itemList = this.formList1.find(x => x.fieldName == 'idTypeCode').itemList;
        this.formList1.find(x => x.fieldName == 'idTypeCode').itemList = itemList.filter(item => item.value == 21201008 || item.value == 21201007);
      } else {
        if (this.type !== 'show') {
        this.formList1.find(x => x.fieldName == 'sex').rules = [{ required: true, message: '请选择性别', trigger: 'change' }];
        this.formList1.find(x => x.fieldName == 'idTypeCode').rules = [{ required: true, message: '请选择', trigger: 'change' }];
        if (this.formList1.find(x => x.fieldName == 'idTypeCode').initialValue == 21201001) {
          this.formList1.find(x => x.fieldName == 'idNumber').rules = [
            { required: true, message: '请输入', trigger: 'blur' },
            { required: true, message: '请输入正确的身份证号', validator: IDNumber, trigger: 'blur' }
          ];
        } else {
          this.formList1.find(x => x.fieldName == 'idNumber').rules = [{ required: true, message: '请输入', trigger: 'change' }];
        }
        this.formList1.find(x => x.fieldName == 'identityCardFront').rules = [{ required: false, message: '请上传', trigger: 'change' }];
        this.formList1.find(x => x.fieldName == 'identityCardReverse').rules = [{ required: false, message: '请选择.', trigger: 'change' }];
        this.formList1.find(x => x.fieldName == 'soNo').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList1.find(x => x.fieldName == 'customerType').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'consultantName').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'orderAllAmount').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'handoverCarTime').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'isSpecialOrder').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'isThreeGuarantees').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        this.formList2.find(x => x.fieldName == 'buildChargingPiles').rules = [{ required: true, message: '请输入', trigger: 'blur' }];
        let arr = [{ required: true, message: '请上传', trigger: 'change' }];
        this.formList2.find(x => x.fieldName == 'proceduralContract').rules = arr;
        this.formList2.find(x => x.fieldName == 'holdIdentityCard').rules = arr;
        }
        this.formList1.find(x => x.fieldName == 'companyName').hidden = true;
        this.formList1.find(x => x.fieldName == 'adminAuthorizationFiles').hidden = true;
        this.formList1.find(x => x.fieldName == 'unitContactPersonCardFront').hidden = true;
        this.formList1.find(x => x.fieldName == 'unitContactPersonCardReverse').hidden = true;
        this.formList1.find(x => x.fieldName == 'unitContactPersonId').hidden = true;
        this.formList1.find(x => x.fieldName == 'lagalPersonId').hidden = true;
        this.formList1.find(x => x.fieldName == 'lagalPersonName').hidden = true;
        this.formList1.find(x => x.fieldName == 'fax').hidden = true;
        this.formList1.find(x => x.fieldName == 'lagalPersonMobile').hidden = true;
        this.formList1.find(x => x.fieldName == 'legalIdentityCardFront').hidden = true;
        this.formList1.find(x => x.fieldName == 'legalIdentityCardReverse').hidden = true;
        this.formList1.find(x => x.fieldName == 'businessLicense').hidden = true;
        this.formList1.find(x => x.fieldName == 'institutionCode').hidden = true;
        this.formList1.find(x => x.fieldName == 'unitContactMobile').hidden = true;
        this.formList1.find(x => x.fieldName == 'unitContactor').hidden = true;

        this.formList1.forEach(x => {
          if (
            x.fieldName == 'birthday' ||
            x.fieldName == 'ageStage' ||
            x.fieldName == 'wechatNo' ||
            x.fieldName == 'identityCardFront' ||
            x.fieldName == 'identityCardReverse' ||
            x.fieldName == 'occupationType' ||
            x.fieldName == 'educationLevel' ||
            x.fieldName == 'householdType' ||
            x.fieldName == 'unitNature' ||
            x.fieldName == 'industryType' ||
            x.fieldName == 'maritalStatus' ||
            x.fieldName == 'annualHouseholdIncome' ||
            x.fieldName == 'hobby' ||
            x.fieldName == 'favoriteContactType' ||
            x.fieldName == 'convenientTime'
          ) {
            x.disabled = false;
          }
        });
        // this.formList1.find(x => x.fieldName == 'sex').hidden = true;

        //  个人不允许选择统一社会信用编码和机构代码
        const itemList = this.formList1.find(x => x.fieldName == 'idTypeCode').itemList;
        this.formList1.find(x => x.fieldName == 'idTypeCode').itemList = itemList.filter(item => !(item.value == 21201007 || item.value == 21201008));
        // let arr = [];

      }
    },
    // 是否是大客户
    isSelectVip(val) {
      if (val == 10041001) {
        this.formList1.find(x => x.fieldName == 'bigCustomerFiles').hidden = false;
      } else {
        this.formList1.find(x => x.fieldName == 'bigCustomerFiles').hidden = true;
      }
    },
    // 是否是燃油车
    selectPowerType(val) {
      let arr = [];
      let notArr = [{ required: true, message: '请上传', trigger: 'change' }];
      if (val == 50081001) {
        arr = [{ required: false, message: '请上传', trigger: 'change' }];
        notArr = [];
      }
      // 电车必传
      this.formList2.find(x => x.fieldName == 'isBatteryRental').rules = notArr;
      // this.formList2.find(x => x.fieldName == 'commercialInsuranceFiles').rules = notArr;
      // this.formList2.find(x => x.fieldName == 'trafficlInsuranceFiles').rules = notArr;
    },

    isSelectRebate(val) {
      let arr = [];
      if (val == 10041001) {
        arr = [{ required: true, message: '请上传', trigger: 'change' }];
      }
      this.formList2.find(x => x.fieldName == 'rebateFiles').rules = arr;
      console.log('返利' + val);
      console.log(this.formList2.find(x => x.fieldName == 'rebateFiles'));
    },
    isSelectReplace(val) {
      let arr = [];
      if (val == 10041001) {
        arr = [{ required: true, message: '请上传', trigger: 'change' }];
      }
      this.formList2.find(x => x.fieldName == 'replaceFiles').rules = arr;
      console.log('换购' + val);
      console.log(this.formList2.find(x => x.fieldName == 'replaceFiles'));
    },
    // 翻译省市区
    transDictText(val, dirtArr) {
      console.log(dirtArr, '---翻译---');
      let res = '';
      if (!val) return res;
      if (Array.isArray(dirtArr)) {
        const target = dirtArr.find(x => x.value == val);
        res = target ? target.text || '' : val;
      }
      return res;
    },
    // ---------------------------车辆信息---------------------------
    createdFrom() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '车辆信息'
        },
        {
          type: 'INPUT',
          label: '品牌',
          fieldName: 'brandName',
          initialValue: '',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '车系',
          fieldName: 'seriesName',
          initialValue: '',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '车型',
          fieldName: 'modelName',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '配置',
          fieldName: 'configName',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '年款',
          fieldName: 'yearModel',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '选装',
          fieldName: 'optionName',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '内饰',
          fieldName: 'trimName',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '外饰',
          fieldName: 'colorName',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '物料编码',
          fieldName: 'productCode',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '物料描述',
          fieldName: 'productName',
          placeholder: '',
          disabled: true
        },
        {
          type: 'SELECT',
          label: '动力类型',
          fieldName: 'powerType',
          disabled: true,
          placeholder: '',
          itemList: this.createDictList('5008'),
        },
        {
          type: 'INPUT',
          label: '销售指导价',
          fieldName: 'directivePrice',
          placeholder: '',
          disabled: true,
          numberFormat: true,
          precision: 2
        },
        {
          type: 'INPUT',
          label: 'VIN',
          fieldName: 'vin',
          initialValue: '',
          disabled: !this.isAdd,
          readonly: true,
          placeholder: '请输入VIN...',
          rules: [{ required: true, message: '请输入VIN...', trigger: 'blur' }],
          unitRender: p => {
            return (
              <div>
                <multiuse-button icon="el-icon-search" onClick={() => this.selectVin()} />
              </div>
            );
          }
        },
        {
          type: 'INPUT',
          label: '发动机号',
          fieldName: 'engineNo',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '电机号',
          fieldName: 'eleEngineNo',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '合格证号',
          fieldName: 'certificateNumber',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '电池号',
          fieldName: 'batteryNo',
          placeholder: '',
          disabled: true
        },
        {
          type: 'DATE',
          label: '终端配车日期',
          maxDateTime: new Date(),
          fieldName: 'dispatchedData',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd HH:mm:ss',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '公告号',
          fieldName: 'announcementNo',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '经销商简称',
          fieldName: 'dealerName',
          placeholder: '',
          disabled: true
        },
        {
          type: 'DATE',
          label: '终端出库日期',
          maxDateTime: new Date(),
          fieldName: 'latestStockOutDate',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd HH:mm:ss',
          placeholder: '',
          disabled: true
        }
      ];
    },

    // ----------------------------客户信息--------------------------
    createdFrom1() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '客户信息'
        },
        {
          type: 'INPUT',
          label: '零售单号',
          fieldName: 'soNo',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '客户编号',
          fieldName: 'potentialCustomerNo',
          placeholder: '',
          disabled: true
        },
        {
          type: 'INPUT',
          label: '客户姓名',
          fieldName: 'customerName',
          maxlength: 36,
          disabled: true,
          rules: [],
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '客户类型',
          fieldName: 'customerType',
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2117') || [],
          change: val => {
            this.selectCustomer(val);
          }
        },
        {
          type: 'SELECT',
          label: '性别',
          fieldName: 'sex',
          placeholder: '',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          itemList: this.createDictList('1002') || []
        },
        {
          type: 'SELECT',
          label: '证件类型',
          fieldName: 'idTypeCode',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2120') || [],
          change: val => {
            this.changIdCard(val);
          }
        },
        {
          type: 'INPUT',
          label: '证件号',
          fieldName: 'idNumber',
          rules: [],
          placeholder: '',
          maxlength: 36,
          change: val => {
            this.changeIdNumber(val);
          }
        },
        {
          type: 'DATE',
          label: '出生日期',
          maxDateTime: new Date(),
          fieldName: 'birthday',
          disabled: true,
          dateType: 'exactdate',
          disabled: true,
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '年龄段',
          fieldName: 'ageStage',
          disabled: true,
          placeholder: '',
          itemList: this.createDictList('2118') || []
        },
        {
          type: 'INPUT',
          label: '手机号',
          fieldName: 'customerMobile',
          disabled: true,
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '电话',
          maxlength: 36,
          fieldName: 'customerPhone',
          rules: [],
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '微信号',
          maxlength: 36,
          rules: [],
          fieldName: 'wechatNo',
          disabled: true,
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '联系地址',
          rules: [{ required: true, message: '请输入', trigger: 'change' }],
          maxlength: 36,
          fieldName: 'address',
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '省份',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          fieldName: 'provinceName',
          initialValue: '',
          style: { width: '150px' },
          itemList: [],
        },
        {
          type: 'SELECT',
          label: '城市',
          rules: [{ required: true, message: '请选择', trigger: 'change' }],
          fieldName: 'cityName',
          style: { width: '150px' },
          initialValue: '',
          itemList: [],
        },
        {
          type: 'SELECT',
          label: '县区',
          // rules: [{ required: true, message: '请选择', trigger: 'change' }],
          fieldName: 'districtName',
          style: { width: '150px' },
          placeholder: '',
          initialValue: '',
          itemList: [],
        },
        {
          type: 'INPUT',
          label: '统一社会信用代码',
          maxlength: 36,
          fieldName: 'institutionCode',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '运营单位联系人',
          maxlength: 36,
          fieldName: 'unitContactor',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '运营单位联系电话',
          maxlength: 36,
          fieldName: 'unitContactMobile',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: ''
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '企业',
          fieldName: 'companyName',
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: ''
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '授权人身份证号',
          fieldName: 'unitContactPersonId',
          rules: [
            { required: true, message: '请输入', trigger: 'blur' },
            { required: true, message: '请输入正确的身份证号', validator: IDNumber, trigger: 'blur' }
          ],
          placeholder: ''
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '法人身份证号',
          fieldName: 'lagalPersonId',
          rules: [
            { required: true, message: '请输入', trigger: 'blur' },
            { required: true, message: '请输入正确的身份证号', validator: IDNumber, trigger: 'blur' }
          ],
          placeholder: ''
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '法人代表姓名',
          rules: [],
          fieldName: 'lagalPersonName',
          placeholder: ''
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '法人代表手机',
          rules: [],
          fieldName: 'lagalPersonMobile',
          placeholder: ''
        },

        {
          type: 'INPUT',
          maxlength: 36,
          label: '传真',
          // rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          fieldName: 'fax',
          placeholder: ''
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '邮编',
          rules: [{ message: '请输入正确的邮编', validator: zipCode, trigger: 'blur' }],
          fieldName: 'zipCode',
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '是否大客户',
          fieldName: 'isVip',
          placeholder: '',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          itemList: this.createDictList('1004') || [],
          change: val => {
            this.isSelectVip(val);
          }
        },
        {
          type: 'INPUT',
          label: '使用人',
          maxlength: 36,
          rules: [{ required: true, message: '请输入', trigger: 'change' }],
          fieldName: 'user',
          placeholder: ''
        },
        {
          type: 'INPUT',
          maxlength: 36,
          label: '使用人电话',
          rules: [{ required: true, message: '请输入', trigger: 'change' }],
          fieldName: 'userMobile',
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '职业',
          fieldName: 'occupationType',
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2122') || []
        },
        {
          type: 'SELECT',
          label: '学历',
          disabled: true,
          fieldName: 'educationLevel',
          placeholder: '',
          itemList: this.createDictList('1035') || []
        },
        {
          type: 'SELECT',
          label: '户口类型',
          fieldName: 'householdType',
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2121') || []
        },
        {
          type: 'SELECT',
          label: '单位性质',
          disabled: true,
          fieldName: 'unitNature',
          placeholder: '',
          itemList: this.createDictList('2123') || []
        },
        {
          type: 'SELECT',
          label: '行业类型',
          fieldName: 'industryType',
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2124') || []
        },
        // {
        //   type: 'SELECT',
        //   label: '客户级别',
        //   rules: [{ required: true, message: '请选择', trigger: 'change' }],
        //   fieldName: 'intentLevel',
        //   placeholder: '',
        //   itemList: this.createDictList('2129') || []
        // },
        {
          type: 'SELECT',
          label: '婚姻状况',
          fieldName: 'maritalStatus',
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2125') || []
        },
        {
          type: 'SELECT',
          label: '家庭年收入',
          fieldName: 'annualHouseholdIncome',
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2126') || []
        },
        {
          type: 'SELECT',
          label: '兴趣爱好',
          fieldName: 'hobby',
          disabled: true,
          placeholder: '',
          itemList: this.createDictList('2129') || []
        },
        {
          type: 'SELECT',
          label: '习惯联系方式',
          fieldName: 'favoriteContactType',
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2131') || []
        },
        {
          type: 'SELECT',
          label: '方便联系时段',
          fieldName: 'convenientTime',
          placeholder: '请选择',
          disabled: true,
          itemList: this.createDictList('2128') || []
        },
        {
          type: 'UPLOAD_FILE',
          label: '身份证正面',
          fieldName: 'identityCardFront',
          selfCols: 2,
          // rules: [{ required: false, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          },
          disabled: true,
          // change: val => {
          //   this.changeUpload(val);
          // }
        },
        {
          type: 'UPLOAD_FILE',
          label: '身份证反面',
          selfCols: 2,
          fieldName: 'identityCardReverse',
          // rules: [{ required: false, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          },
          disabled: true,
          // change: val => {
          //   this.changeUpload(val);
          // }
        },
        {
          type: 'UPLOAD_FILE',
          label: '法人身份证正面',
          selfCols: 2,
          fieldName: 'legalIdentityCardFront',
          // rules: [{ required: false, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '法人身份证反面',
          // rules: [{ required: false, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          fieldName: 'legalIdentityCardReverse',
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '营业执照',
          fieldName: 'businessLicense',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '管理员授权文件',
          fieldName: 'adminAuthorizationFiles',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '授权人身份证正面',
          fieldName: 'unitContactPersonCardFront',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '授权人身份证反面',
          fieldName: 'unitContactPersonCardReverse',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '大客户附件',
          fieldName: 'bigCustomerFiles',
          hidden: true,
          rules: [{ required: false, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        }
      ];
    },
    // ----------------------------销售信息--------------------------
    createdFrom2() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '销售信息'
        },
        {
          type: 'SELECT',
          label: '购车用途',
          fieldName: 'purchasePurpose',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2127') || []
        },
        {
          type: 'INPUT',
          label: '销售顾问',
          disabled: true,
          rules: [],
          fieldName: 'consultantName',
          placeholder: ''
        },
        {
          type: 'INPUT_NUMBER',
          label: '购车价格',
          disabled: true,
          fieldName: 'orderAllAmount',
          rules: [],
          maxlength: 9,
          placeholder: '',
          numberFormat: true,
          precision: 0
        },
        {
          type: 'DATE',
          label: '交车日期',
          disabled: true,
          maxDateTime: new Date(),
          format: 'yyyy-MM-dd HH:mm:ss',
          fieldName: 'handoverCarTime',
          dateType: 'exactdate',
          rules: [],
          placeholder: ''
        },
        {
          type: 'DATE',
          label: '订单创建日期',
          maxDateTime: new Date(),
          disabled: true,
          fieldName: 'snCreatedDate',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd HH:mm:ss',
          placeholder: ''
        },
        {
          type: 'DATE',
          label: '终端开票日期',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          maxDateTime: new Date(),
          fieldName: 'drawTime',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd',
          placeholder: ''
        },
        {
          type: 'INPUT_NUMBER',
          min: 0,
          label: '开票金额',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'totalaMount',
          maxlength: 8,
          precision: 0,
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '发票号',
          rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          fieldName: 'invoiceNo',
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '特殊订单',
          fieldName: 'isSpecialOrder',
          rules: [],
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'SELECT',
          label: '是否三包',
          fieldName: 'isThreeGuarantees',
          rules: [],
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'SELECT',
          label: '是否异地购车',
          rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          fieldName: 'isAnotherPlace',
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        // {
        //   type: 'CHECKBOX',
        //   label: '是否试乘试驾车',
        //   // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
        //   fieldName: 'isTestDriveCar',
        //   placeholder: '',
        //   initialValue: 10041001,
        //   options: {
        //     trueValue: 10041001,
        //     falseValue: 10041002
        //   },
        //   itemList: this.createDictList('1004') || []
        // },
        {
          type: 'INPUT_NUMBER',
          min: 0,
          label: '交车里程',
          maxlength: 8,
          precision: 0,
          rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          fieldName: 'mileageUid',
          placeholder: ''
        },
        {
          type: 'INPUT_NUMBER',
          min: 0,
          label: '终身质保价格',
          fieldName: 'lifetimeWarrantyPrice',
          maxlength: 8,
          precision: 0,
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '是否终身质保',
          fieldName: 'isLifetimeWarranty',
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'SELECT',
          label: '是否建设电桩',
          fieldName: 'buildChargingPiles',
          rules: [],
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'SELECT',
          label: '是否申报补贴',
          fieldName: 'isApplySubsidies',
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'SELECT',
          label: '是否二次购买',
          fieldName: 'isBuyAgain',
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'SELECT',
          label: '是否销量冲刺',
          fieldName: 'isSalesSprint',
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'SELECT',
          label: '是否融资返利',
          fieldName: 'isRebate',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
          change: val => {
            this.isSelectRebate(val);
          }
        },
        {
          type: 'SELECT',
          label: '是否增换购',
          fieldName: 'isReplace',
          placeholder: '',
          itemList: this.createDictList('1004') || [],
          change: val => {
            this.isSelectReplace(val);
          }
        },
        {
          type: 'SELECT',
          label: '是否电池租赁',
          // offsetRightCols: 2,
          rules: [],
          fieldName: 'isBatteryRental',
          placeholder: '',
          itemList: this.createDictList('1004') || []
        },
        // {
        //   type: 'INPUT',
        //   label: '开票单位',
        //   rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
        //   fieldName: 'invoiceUnit',
        //   placeholder: ''
        // },
        {
          type: 'SELECT',
          label: '车辆用途',
          fieldName: 'vehicleUse',
          // rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2102') || [],
        },
        {
          type: 'SELECT',
          label: '是否分期',
          fieldName: 'typeOfPayment',
          // rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          disabled: true,
          itemList: this.createDictList('2156') || [],
        },
        {
          type: 'SELECT',
          label: '交车方式',
          fieldName: 'handoverCarMethod',
          // rules: [{ required: true, message: '请选择 ', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2155') || [],
        },
        {
          type: 'CHECKBOX',
          label: '是否试乘试驾车',
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          fieldName: 'isTestDriveCar',
          placeholder: '',
          initialValue: 10041001,
          options: {
            trueValue: 10041001,
            falseValue: 10041002
          },
          itemList: this.createDictList('1004') || []
        },
        {
          type: 'TEXT_AREA',
          label: '备注',
          offsetRightCols: 1,
          maxlength: 600,
          fieldName: 'remark',
          placeholder: '',
          selfCols: 3
        },

        {
          type: 'UPLOAD_FILE',
          label: '发票附件',
          fieldName: 'invoiceUidList',
          selfCols: 2,
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          },
          // change: val => {
          //   this.changeUpload(val);
          // }
        },
        {
          type: 'UPLOAD_FILE',
          label: '终端销售合同',
          selfCols: 2,
          fieldName: 'terminalSalesContract',
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '过程性合同',
          fieldName: 'proceduralContract',
          selfCols: 2,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '手持身份证照片',
          fieldName: 'holdIdentityCard',
          selfCols: 2,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '商业保险单',
          // disabled: true,
          fieldName: 'commercialInsuranceFiles',
          selfCols: 2,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '交强保险单',
          // disabled: true,
          fieldName: 'trafficlInsuranceFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          },
          // change: val => {
          //   this.changeUpload(val);
          // }
        },
        {
          type: 'UPLOAD_FILE',
          label: '融资返利文件',
          disabled: true,
          fieldName: 'rebateFiles',
          selfCols: 2,
          hidden: true,
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf'],
            limit: 2
            // tipText: '最多上传1个附件'
          },
          // change: val => {
          //   this.changeUpload(val);
          // }
        },
        {
          type: 'UPLOAD_FILE',
          label: '增换购附件',
          disabled: true,
          fieldName: 'replaceFiles',
          selfCols: 2,
          hidden: true,
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '交车单附件',
          // disabled: true,
          fieldName: 'andoverCarFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        },
        {
          type: 'UPLOAD_FILE',
          label: '其他附件',
          fieldName: 'attachmentUidsList',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'xls', 'pdf', 'xlsx', 'rar', 'zip'],
            limit: 10
          }
        },
        {
          type: 'BREAK_SPACE',
          label: '权益列表',
        },
      ];
    },
    createdTable1() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 80,
          sorter: true,
          fixed: 'left',
          render: (props) => {
            return <span>{props.row.index + 1}</span>;
          },
        },
        {
          title: '权益代码',
          dataIndex: 'rightsInterestsCode',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '权益名称',
          dataIndex: 'rightsInterestsName',
          sorter: true,
          filter: true,
          filterType: 'input',
        },
        {
          title: '权益金额',
          dataIndex: 'rightsInterestsPrice',
          sorter: true,
          filter: true,
          filterType: 'input',
          numberFormat: true,
          precision: 2,
        },
      ];
    },
    // ----------------------------上牌信息--------------------------
    createdFrom3() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '上牌信息'
        },
        {
          type: 'INPUT',
          label: '车牌号',
          // rules: [{ required: true, message: '请输入正确的车牌号', validator: ownerLicensePlate, trigger: 'blur' }],
          rules: [
            // { required: true, message: '请输入车牌号', trigger: ['blur', 'change'] },
            { min: 2, max: 8, message: '最长为8个字符', trigger: ['blur', 'change'] }
          ],
          disabled: true,
          maxlength: 8,
          fieldName: 'licensePlateNumber',
          placeholder: ''
        },
        {
          type: 'DATE',
          label: '上牌日期',
          maxDateTime: new Date(),
          fieldName: 'licensePlateDate',
          dateType: 'exactdate',
          disabled: true,
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          placeholder: ''
        },
        {
          type: 'SELECT',
          label: '行驶证车辆性质',
          fieldName: 'licenseVehicleNature',
          disabled: true,
          // rules: [{ required: true, message: '请选择', trigger: 'change' }],
          placeholder: '',
          itemList: this.createDictList('2114')
        },
        {
          type: 'SELECT',
          label: '上牌省份',
          fieldName: 'licensePlateProvinceName',
          // rules: [{ required: true, message: '请选择', trigger: 'change' }],
          placeholder: '',
          // itemList: this.createRegionsList()
          itemList: [],
        },
        {
          type: 'SELECT',
          label: '上牌城市',
          // rules: [{ required: true, message: '请选择', trigger: 'change' }],
          fieldName: 'licensePlateCityName',
          placeholder: '',
          itemList: [],
        },
        {
          type: 'INPUT',
          label: '行驶证号',
          maxlength: 36,
          disabled: true,
          fieldName: 'vehicleLicenseNumber',
          rules: [
            // { required: false, message: '请输入', trigger: 'blur' }
            // { required: false, message: '请输入正确的行驶证号', validator: licenseNum, trigger: 'blur' }
          ],
          placeholder: ''
        },
        {
          type: 'DATE',
          label: '行驶证注册日期',
          maxDateTime: new Date(),
          disabled: true,
          fieldName: 'vehicleLicenseDate',
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          dateType: 'exactdate',
          placeholder: ''
        },
        {
          type: 'DATE',
          label: '行驶证发证日期',
          disabled: true,
          maxDateTime: new Date(),
          fieldName: 'vehicleLicenseIssueDate',
          // rules: [{ required: true, message: '请选择', trigger: 'blur' }],
          dateType: 'exactdate',
          placeholder: ''
        },
        // {
        //   type: 'INPUT',
        //   label: '行驶证档案编号',
        //   fieldName: 'vehicleLicenseFileNo',
        //   rules: [{ required: true, message: '请选择', trigger: 'blur' }],
        //   placeholder: '',
        //   disabled: false
        // },
        {
          type: 'INPUT',
          label: '行驶证住址',
          disabled: true,
          maxlength: 36,
          fieldName: 'vehicleLicenseAddress',
          // rules: [{ required: true, message: '请输入', trigger: 'blur' }],
          placeholder: ''
        },

        // {
        //   type: 'INPUT',
        //   label: '驾驶证号',
        //   maxlength: 36,
        //   rules: [{ min: 0, max: 20, message: '驾驶证号输入有误，请检查', trigger: 'blur' }],
        //   fieldName: 'drivingLicenseNumber',
        //   placeholder: ''
        // },

        {
          type: 'INPUT_NUMBER',
          label: '行驶里程',
          disabled: true,
          precision: 0,
          maxlength: 8,
          fieldName: 'mileage',
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '行驶证所有人',
          rules: [],
          fieldName: 'vehiclePossessor',
          placeholder: '',
          disabled: true
        },
        {
          type: 'TEXT_AREA',
          label: '备注',
          offsetRightCols: 1,
          maxlength: 600,
          disabled: true,
          fieldName: 'licenseRemark',
          placeholder: '',
          selfCols: 3
        },
        {
          type: 'UPLOAD_FILE',
          label: '行驶证正面',
          disabled: true,
          fieldName: 'vehicleLicenseFrontList',
          selfCols: 2,
          // rules: [{ required: true, message: '请上传', trigger: 'blur' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            // fileTypes: ['jpg', 'png', 'bmp'],
            fileTypes: ['jpg'],
            fileSize: 0.5,
            limit: 1,
            tipText: '最多上传1个附件'
          },
          change: val => {
            this.changeUpload(val);
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '行驶证反面',
          disabled: true,
          selfCols: 2,
          fieldName: 'vehicleLicenseBackList',
          // rules: [{ required: true, message: '请上传', trigger: 'blur' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          },
          change: val => {
            this.changeUpload(val);
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '驾驶证正面',
          selfCols: 2,
          disabled: true,
          fieldName: 'drivingLicenseFrontList',
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          },
          change: val => {
            this.changeUpload(val);
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '驾驶证反面',
          selfCols: 2,
          disabled: true,
          fieldName: 'drivingLicenseBackList',
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          },
          change: val => {
            this.changeUpload(val);
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '其他附件',
          disabled: true,
          fieldName: 'otherFileUrlList',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'xls', 'pdf', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          },
          change: val => {
            this.changeUpload(val);
          }
        }
      ];
    },
    // ----------------------------其他信息--------------------------
    createdFrom4() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '变更信息'
        },
        {
          type: 'TEXT_AREA',
          label: '变更说明',
          selfCols: 3,
          disabled: true,
          maxlength: 120,
          fieldName: 'alteration',
          placeholder: ''
        },
        {
          type: 'TEXT_AREA',
          label: '变更审批意见',
          fieldName: 'auditOpinion',
          maxlength: 120,
          placeholder: '',
          selfCols: 3
        }
      ];
    },
    createdTable() {
      return [
        {
          title: '序号',
          dataIndex: 'index',
          width: 80,
          sorter: true,
          fixed: 'left',
          render: props => {
            return <span>{props.row.index + 1}</span>;
          }
        },
        {
          title: '变更字段类型',
          dataIndex: 'auditName',
          sorter: true,
          filter: true,
          filterType: 'input'
        },
        {
          title: '变更前',
          dataIndex: 'auditBefore',
          sorter: true,
          filter: true,
          filterType: 'input',
          render: props => <span>{props.row.value2}</span>
        },
        {
          title: '变更后',
          dataIndex: 'auditAfter',
          sorter: true,
          filter: true,
          filterType: 'input',
          render: props => <span>{props.row.value3}</span>
        },
        {
          title: '变更时间',
          dataIndex: 'createdAt',
          sorter: true,
          filter: true,
          filterType: 'input',
          dateFormat: 'yyyy-MM-dd HH:mm:ss'
        },
        {
          title: '变更人',
          dataIndex: 'createdBy',
          sorter: true,
          filter: true,
          filterType: 'input'
        }
      ];
    },
    createdFrom5() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '变更前'
        },
        {
          type: 'UPLOAD_FILE',
          label: '身份证正面',
          billType: 11121006,
          disabled: true,
          hidden: true,
          fieldName: 'identityCardFront',
          selfCols: 2,
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '身份证反面',
          disabled: true,
          hidden: true,
          billType: 11121007,
          selfCols: 2,
          fieldName: 'identityCardReverse',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          billType: 11121008,
          disabled: true,
          hidden: true,
          label: '法人身份证正面',
          selfCols: 2,
          fieldName: 'legalIdentityCardFront',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          billType: 11121009,
          disabled: true,
          hidden: true,
          label: '法人身份证反面',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          fieldName: 'legalIdentityCardReverse',
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '营业执照',
          billType: 11121010,
          disabled: true,
          hidden: true,
          fieldName: 'businessLicense',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '管理员授权文件',
          billType: 11121016,
          disabled: true,
          hidden: true,
          fieldName: 'adminAuthorizationFiles',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '授权人身份证正面',
          billType: 11121017,
          disabled: true,
          hidden: true,
          fieldName: 'unitContactPersonCardFront',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '授权人身份证反面',
          billType: 11121018,
          disabled: true,
          hidden: true,
          fieldName: 'unitContactPersonCardReverse',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '大客户附件',
          billType: 11121011,
          disabled: true,
          hidden: true,
          fieldName: 'bigCustomerFiles',
          hidden: true,
          rules: [{ required: false, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '发票附件',
          disabled: true,
          hidden: true,
          billType: 11121001,
          fieldName: 'invoiceUidList',
          selfCols: 2,
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '终端销售合同',
          selfCols: 2,
          disabled: true,
          hidden: true,
          billType: 11121004,
          fieldName: 'terminalSalesContract',
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '过程性合同',
          billType: 11121005,
          fieldName: 'proceduralContract',
          selfCols: 2,
          disabled: true,
          hidden: true,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '手持身份证照片',
          billType: 11121002,
          disabled: true,
          hidden: true,
          fieldName: 'holdIdentityCard',
          selfCols: 2,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '商业保险单',
          disabled: true,
          hidden: true,
          disabled: true,
          billType: 11121014,
          fieldName: 'commercialInsuranceFiles',
          selfCols: 2,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '交强保险单',
          disabled: true,
          hidden: true,
          disabled: true,
          billType: 11121015,
          fieldName: 'trafficlInsuranceFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '融资返利文件',
          billType: 11121012,
          disabled: true,
          hidden: true,
          fieldName: 'rebateFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf'],
            limit: 2
            // tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '增换购附件',
          disabled: true,
          hidden: true,
          fieldName: 'replaceFiles',
          selfCols: 2,
           billType: 11121013,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '行驶证正面',
          disabled: true,
          hidden: true,
          billType: 21121001,
          fieldName: 'vehicleLicenseFrontList',
          selfCols: 2,
          rules: [{ required: true, message: '请上传', trigger: 'blur' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '行驶证反面',
          billType: 21121002,
          disabled: true,
          hidden: true,
          selfCols: 2,
          fieldName: 'vehicleLicenseBackList',
          rules: [{ required: true, message: '请上传', trigger: 'blur' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '驾驶证正面',
          disabled: true,
          hidden: true,
          selfCols: 2,
          billType: 21121003,
          fieldName: 'drivingLicenseFrontList',
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '驾驶证反面',
          disabled: true,
          hidden: true,
          billType: 21121004,
          selfCols: 2,
          fieldName: 'drivingLicenseBackList',
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '上牌信息其他附件',
          disabled: true,
          hidden: true,
          billType: 21121005,
          fieldName: 'otherFileUrlList',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'xls', 'pdf', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '销售信息其他附件',
          disabled: true,
          hidden: true,
          billType: 11121003,
          fieldName: 'attachmentUidsList',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'xls', 'pdf', 'xlsx', 'rar', 'zip'],
            limit: 10
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '交车单附件',
          disabled: true,
          hidden: true,
          billType: 11121024,
          // disabled: true,
          fieldName: 'andoverCarFiles',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        }
      ];
    },
    createdFrom6() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '变更后'
        },
        {
          type: 'UPLOAD_FILE',
          label: '身份证正面',
          billType: 11121006,
          disabled: true,
          hidden: true,
          fieldName: 'identityCardFront',
          selfCols: 2,
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '身份证反面',
          disabled: true,
          hidden: true,
          billType: 11121007,
          selfCols: 2,
          fieldName: 'identityCardReverse',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          billType: 11121008,
          disabled: true,
          hidden: true,
          label: '法人身份证正面',
          selfCols: 2,
          fieldName: 'legalIdentityCardFront',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          billType: 11121009,
          disabled: true,
          hidden: true,
          label: '法人身份证反面',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          fieldName: 'legalIdentityCardReverse',
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '营业执照',
          billType: 11121010,
          disabled: true,
          hidden: true,
          fieldName: 'businessLicense',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '管理员授权文件',
          billType: 11121016,
          disabled: true,
          hidden: true,
          fieldName: 'adminAuthorizationFiles',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '授权人身份证正面',
          billType: 11121017,
          disabled: true,
          hidden: true,
          fieldName: 'unitContactPersonCardFront',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '授权人身份证反面',
          billType: 11121018,
          disabled: true,
          hidden: true,
          fieldName: 'unitContactPersonCardReverse',
          // rules: [{ required: true, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '大客户附件',
          billType: 11121011,
          disabled: true,
          hidden: true,
          fieldName: 'bigCustomerFiles',
          hidden: true,
          rules: [{ required: false, message: '请上传', trigger: 'change' }],
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '发票附件',
          disabled: true,
          hidden: true,
          billType: 11121001,
          fieldName: 'invoiceUidList',
          selfCols: 2,
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '终端销售合同',
          selfCols: 2,
          disabled: true,
          hidden: true,
          billType: 11121004,
          fieldName: 'terminalSalesContract',
          rules: [{ required: true, message: '请上传', trigger: 'change' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '过程性合同',
          billType: 11121005,
          fieldName: 'proceduralContract',
          selfCols: 2,
          disabled: true,
          hidden: true,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '手持身份证照片',
          billType: 11121002,
          disabled: true,
          hidden: true,
          fieldName: 'holdIdentityCard',
          selfCols: 2,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '商业保险单',
          disabled: true,
          hidden: true,
          disabled: true,
          billType: 11121014,
          fieldName: 'commercialInsuranceFiles',
          selfCols: 2,
          rules: [],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '交强保险单',
          disabled: true,
          hidden: true,
          disabled: true,
          billType: 11121015,
          fieldName: 'trafficlInsuranceFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '融资返利文件',
          billType: 11121012,
          disabled: true,
          hidden: true,
          fieldName: 'rebateFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf'],
            limit: 2
            // tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '增换购附件',
          disabled: true,
          hidden: true,
          billType: 11121013,
          fieldName: 'replaceFiles',
          selfCols: 2,
          rules: [],
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '行驶证正面',
          disabled: true,
          hidden: true,
          billType: 21121001,
          fieldName: 'vehicleLicenseFrontList',
          selfCols: 2,
          rules: [{ required: true, message: '请上传', trigger: 'blur' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '行驶证反面',
          billType: 21121002,
          disabled: true,
          hidden: true,
          selfCols: 2,
          fieldName: 'vehicleLicenseBackList',
          rules: [{ required: true, message: '请上传', trigger: 'blur' }],
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '驾驶证正面',
          disabled: true,
          hidden: true,
          selfCols: 2,
          billType: 21121003,
          fieldName: 'drivingLicenseFrontList',
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '驾驶证反面',
          disabled: true,
          hidden: true,
          billType: 21121004,
          selfCols: 2,
          fieldName: 'drivingLicenseBackList',
          // selfCols: 3,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'bmp'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '上牌信息其他附件',
          disabled: true,
          hidden: true,
          billType: 21121005,
          fieldName: 'otherFileUrlList',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'xls', 'pdf', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件'
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '销售信息其他附件',
          disabled: true,
          hidden: true,
          billType: 11121003,
          fieldName: 'attachmentUidsList',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'xls', 'pdf', 'xlsx', 'rar', 'zip'],
            limit: 10
          }
        },
        {
          type: 'UPLOAD_FILE',
          label: '交车单附件',
          disabled: true,
          hidden: true,
          billType: 11121024,
          // disabled: true,
          fieldName: 'andoverCarFiles',
          selfCols: 2,
          upload: {
            actionUrl: '/api/file/oss/upload',
            fileTypes: ['jpg', 'png', 'pdf', 'xls', 'xlsx', 'rar', 'zip'],
            limit: 1,
            tipText: '最多上传1个附件',
          },
        }
      ];
    },
    createdFrom7() {
      return [
        {
          type: 'BREAK_SPACE',
          label: '电池租赁'
        },
        {
          type: 'INPUT',
          label: '协议签订',
          disabled: true,
          fieldName: 'statusName',
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '签订类型',
          disabled: true,
          fieldName: 'contractTypeName',
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '保证金缴纳状态',
          disabled: true,
          fieldName: 'depositOrderStatusName',
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '租金缴纳',
          disabled: true,
          fieldName: 'firstRentOrderStatusName',
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '月租金',
          disabled: true,
          fieldName: 'rentAmount',
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '租金类型',
          disabled: true,
          fieldName: 'rentTypeName',
          placeholder: ''
        },
        {
          type: 'INPUT',
          label: '租金名称',
          disabled: true,
          fieldName: 'rentName',
          placeholder: ''
        },
        {
          type: 'DATE',
          label: '协议签订日期',
          maxDateTime: new Date(),
          fieldName: 'signTime',
          dateType: 'exactdate',
          format: 'yyyy-MM-dd HH:mm:ss',
          placeholder: '',
          disabled: true
        },
      ];
    },
  }
};
</script>

<style lang="scss">
.detailed div [type='UN_FIXED'] {
  min-height: 150px !important;
}
</style>
